<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>

      var num = 20;
      for (var i = 0; i <num; i++) {
      	  for (var j = 0; j<num-i-1; j++) {
      	  	  document.write("&nbsp;");
      	  }
      	  for (var k = 0; k <( i + 1) * 2 - 1; k++) {
      	  	  document.write("*");
      	  }
          document.write("<br />");
      }



	</script>
</body>
</html>